<div id="Regular-modules"></div>
<div class="header">
<p>
Next: [[cvs: Ampersand modules#Ampersand modules|Ampersand modules]], Previous: [[cvs: Alias modules#Alias modules|Alias modules]], Up: [[cvs: The modules file#The modules file|modules]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Regular-modules-1"></div>
==== Regular modules ====
<div id="index-Regular-modules"></div>

;<code><var>mname</var> <nowiki>[</nowiki> options <nowiki>]</nowiki> <var>dir</var> <nowiki>[</nowiki> <var>files</var>&hellip; <nowiki>]</nowiki></code>
: In the simplest case, this form of module definition reduces to &lsquo;<code><var>mname</var> <var>dir</var></code>&rsquo;.  This defines all the files in directory <var>dir</var> as module mname. <var>dir</var> is a relative path (from <code>$CVSROOT</code>) to a directory of source in the source repository.  In this case, on checkout, a single directory called <var>mname</var> is created as a working directory; no intermediate directory levels are used by default, even if <var>dir</var> was a path involving several directory levels.

For example, if a module is defined by:

<div class="example" style="margin-left: 3.2em">
 regmodule first-dir
</div>

then regmodule will contain the files from first-dir:

<div class="example" style="margin-left: 3.2em">
 $ cvs co regmodule
 cvs checkout: Updating regmodule
 U regmodule/file1
 U regmodule/file2
 cvs checkout: Updating regmodule/sdir
 U regmodule/sdir/sfile
 $
</div>

By explicitly specifying files in the module definition
after <var>dir</var>, you can select particular files from
directory <var>dir</var>.  Here is
an example:

<div class="example" style="margin-left: 3.2em">
 regfiles first-dir/sdir sfile
</div>

With this definition, getting the regfiles module
will create a single working directory
&lsquo;<tt>regfiles</tt>&rsquo; containing the file listed, which
comes from a directory deeper
in the <small>CVS</small> source repository:

<div class="example" style="margin-left: 3.2em">
 $ cvs co regfiles
 U regfiles/sfile
 $
</div>

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
